import { Table } from './../../model/clerkDataContext';
import { IMessageHandle, IMessageStruct } from './msgHandleMg';
import { ObjectCopier } from './../objectCopier';

export class TableMessageHandle implements IMessageHandle {
    get MessageName() { return "deskTable"; }
    get HandleName() { return "TableMessageHandle"; }
    OnReceived(sender, args: IMessageStruct) {
        let table = ObjectCopier.Copy<Table>(args.body);
        this.OnMessage && this.OnMessage(table);
    }

    OnMessage: (table: Table) => void;
} 